Deep Belief Nets in C++ and CUDA C: Volume 3 by Timothy Masters

Deep Belief Nets in C++ and CUDA C: Volume 3 by Timothy Masters
Author: Timothy Masters
Language: eng
Format: epub, pdf
Publisher: Apress, Berkeley, CA

warpsize = deviceProp.warpSize; // Threads per warp, likely 32 well into the future

threads_per_block = (n_slices + warpsize - 1) / warpsize * warpsize;

if (threads_per_block > 4 * warpsize)

threads_per_block = 4 * warpsize; // Arbitrary but reasonable

block_launch.x = (n_slices + threads_per_block - 1) / threads_per_block;

block_launch.y = nhid / n_slices; // Visual field size; MUST be less than 65535!

block_launch.z = istop - istart; // Number of cases in this batch

device_hidden_activation_LOCAL_CONV <<< block_launch, threads_per_block >>>

(local_vs_conv, istart, 0, 0, n_slices, ilayer);

cudaDeviceSynchronize();

return 0;

}